

<form nz-form [formGroup]="forgetFrom" class="forget-password" (ngSubmit)="forgetForm(forgetFrom.value)">
  <nz-form-item>
    <div class="login-title">修改密码</div>
  </nz-form-item>
  <nz-form-item>
    <nz-form-label [nzSpan]="7" nzRequired>邮箱</nz-form-label>
    <nz-form-control [nzSpan]="12" >
      <input nz-input formControlName="email" placeholder="请输入邮箱" type="email" />
      <ng-template #emailErrorTpl let-control>
        <ng-container *ngIf="control.hasError('email')">
          The input is not valid E-mail!
        </ng-container>
        <ng-container *ngIf="control.hasError('required')">
          Please input your E-mail!
        </ng-container>
      </ng-template>
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-label [nzSpan]="7" nzRequired>密码</nz-form-label>
    <div>
      <nz-form-control [nzSpan]="12" nzHasFeedback nzErrorTip="Please input your password!">
        <input nz-input type="password" formControlName="password" (ngModelChange)="validateConfirmPassword()" placeholder="请输入密码" />
      </nz-form-control>
    </div>
  </nz-form-item>
  <nz-form-item>
    <nz-form-label [nzSpan]="7" nzRequired>确认密码</nz-form-label>
    <nz-form-control [nzSpan]="12" nzHasFeedback>
      <input nz-input type="password" formControlName="confirm"  placeholder="确认密码" />
      <ng-template #passwordErrorTpl let-control>
        <ng-container *ngIf="control.hasError('required')">
          Please confirm your password!
        </ng-container>
        <ng-container *ngIf="control.hasError('confirm')">
          Password is inconsistent!
        </ng-container>
      </ng-template>
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-label  [nzSpan]="7" nzRequired>验证码</nz-form-label>
    <nz-form-control [nzSpan]="12" nzHasFeedback>
      <input nz-input formControlName="captcha"  placeholder="请输入验证码" />
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-control>
      <div nz-row style="text-align: center;">
        <div nz-col [nzSpan]="24">
          <button nz-button class="login-form-button" [disabled]="!forgetFrom?.valid" [nzType]="'primary'">提 交</button>
        </div>
      </div>
      <div style="width: 75%;margin: 0 auto;">
        <a (click)="toLogin()">去登录</a>
      </div>
    </nz-form-control>
  </nz-form-item>


</form>

